examples: python bindings
* Fixed homedir specifying logic in several cases.
This commit is contained in:
parent
b625258d54
commit
7c9f49a499
@ -62,9 +62,9 @@ elif homedir.startswith("~"):
|
|||||||
else:
|
else:
|
||||||
homedir = os.path.realpath(homedir)
|
homedir = os.path.realpath(homedir)
|
||||||
|
|
||||||
if os.path.exists(homedir) is False:
|
if homedir is not None and os.path.exists(homedir) is False:
|
||||||
homedir = None
|
homedir = None
|
||||||
else:
|
elif homedir is not None and os.path.exists(homedir) is True:
|
||||||
if os.path.isdir(homedir) is False:
|
if os.path.isdir(homedir) is False:
|
||||||
homedir = None
|
homedir = None
|
||||||
else:
|
else:
|
||||||
|
@ -62,9 +62,9 @@ elif homedir.startswith("~"):
|
|||||||
else:
|
else:
|
||||||
homedir = os.path.realpath(homedir)
|
homedir = os.path.realpath(homedir)
|
||||||
|
|
||||||
if os.path.exists(homedir) is False:
|
if homedir is not None and os.path.exists(homedir) is False:
|
||||||
homedir = None
|
homedir = None
|
||||||
else:
|
elif homedir is not None and os.path.exists(homedir) is True:
|
||||||
if os.path.isdir(homedir) is False:
|
if os.path.isdir(homedir) is False:
|
||||||
homedir = None
|
homedir = None
|
||||||
else:
|
else:
|
||||||
|
@ -65,9 +65,9 @@ elif homedir.startswith("~"):
|
|||||||
else:
|
else:
|
||||||
homedir = os.path.realpath(homedir)
|
homedir = os.path.realpath(homedir)
|
||||||
|
|
||||||
if os.path.exists(homedir) is False:
|
if homedir is not None and os.path.exists(homedir) is False:
|
||||||
homedir = None
|
homedir = None
|
||||||
else:
|
elif homedir is not None and os.path.exists(homedir) is True:
|
||||||
if os.path.isdir(homedir) is False:
|
if os.path.isdir(homedir) is False:
|
||||||
homedir = None
|
homedir = None
|
||||||
else:
|
else:
|
||||||
|
@ -74,9 +74,9 @@ elif homedir.startswith("~"):
|
|||||||
else:
|
else:
|
||||||
homedir = os.path.realpath(homedir)
|
homedir = os.path.realpath(homedir)
|
||||||
|
|
||||||
if os.path.exists(homedir) is False:
|
if homedir is not None and os.path.exists(homedir) is False:
|
||||||
homedir = None
|
homedir = None
|
||||||
else:
|
elif homedir is not None and os.path.exists(homedir) is True:
|
||||||
if os.path.isdir(homedir) is False:
|
if os.path.isdir(homedir) is False:
|
||||||
homedir = None
|
homedir = None
|
||||||
else:
|
else:
|
||||||
|
@ -60,9 +60,9 @@ elif homedir.startswith("~"):
|
|||||||
else:
|
else:
|
||||||
homedir = os.path.realpath(homedir)
|
homedir = os.path.realpath(homedir)
|
||||||
|
|
||||||
if os.path.exists(homedir) is False:
|
if homedir is not None and os.path.exists(homedir) is False:
|
||||||
homedir = None
|
homedir = None
|
||||||
else:
|
elif homedir is not None and os.path.exists(homedir) is True:
|
||||||
if os.path.isdir(homedir) is False:
|
if os.path.isdir(homedir) is False:
|
||||||
homedir = None
|
homedir = None
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user