]> git.phdru.name Git - m_lib.git/blobdiff - m_lib/m_shutil.py
Raise Error(message) for Py3 compatibility
[m_lib.git] / m_lib / m_shutil.py
index c8325d43d9aada440301bf0b702aeece1ee805b7..f1034e0f65ec90f9a5f1e543276c71e380aa21d0 100755 (executable)
@@ -15,13 +15,13 @@ def mkhier(path): # Python implementation of UNIX' mkdir -p /path/to/dir
       return # It's Ok to have the directory already created
 
    if os.path.exists(path):
-      raise mkhier_error, "`%s' is file" % path
+      raise mkhier_error("`%s' is file" % path)
 
    list_dirs = string.split(path, os.sep)
    #print(list_dirs)
    for i in range(0, len(list_dirs)):
       new_path = string.join(list_dirs[0:i+1], os.sep)
-      if (new_path <> '') and (not os.path.exists(new_path)):
+      if (new_path != '') and (not os.path.exists(new_path)):
          #print("Making", new_path)
          os.mkdir(new_path)