Whamcloud - gitweb
allow lconf to work with python1.5.
authornic <nic>
Tue, 23 Mar 2004 16:02:02 +0000 (16:02 +0000)
committernic <nic>
Tue, 23 Mar 2004 16:02:02 +0000 (16:02 +0000)
do not support http urls until python2, as that is the first occurance of
    urllib2, where the error handling for http is finally sane

lustre/utils/lconf

index b5a9fcc..ac22336 100755 (executable)
@@ -2609,8 +2609,8 @@ def main():
     init_select(config.select)
 
     if len(args) > 0:
-        # allow config to be fetched via HTTP
-        if args[0].startswith('http://'):
+        # allow config to be fetched via HTTP, but only with python2
+        if sys.version[0] != '1' and args[0].startswith('http://'):
             import urllib2
             try:
                 config_file = urllib2.urlopen(args[0])