Commits

Jed Brown  committed 08397b9

Fix compression for os.path.splitext() extension semantics

Hg-commit: ce0599967ddc6ad45a6a5a65192d1d0c7777079a

  • Participants
  • Parent commits 10e2c8a

Comments (0)

Files changed (1)

File bin/urlget.py

 
 def uncompress(filename):
     ext = extension(filename)
-    if ext == 'gz':
+    if ext == '.gz':
         err = os.system('gunzip ' + filename)
         if err != 0:
             error('Error unable to invoke gunzip on ' + filename)
-    elif ext == 'Z':
+    elif ext == '.Z':
         err = os.system('uncompress ' + filename)        
         if err != 0:
             error('Error unable to invoke uncompress on ' + filename)
 
 def compressed(filename):
     ext = extension(filename)
-    if ext == 'gz' or ext == 'Z':
+    if ext == '.gz' or ext == '.Z':
         return 1
     else:
         return 0