diff options
Diffstat (limited to 'external/nss/nsinstall.py')
-rw-r--r-- | external/nss/nsinstall.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/external/nss/nsinstall.py b/external/nss/nsinstall.py index 80e9c1679373..d90a85e6c540 100644 --- a/external/nss/nsinstall.py +++ b/external/nss/nsinstall.py @@ -99,17 +99,17 @@ def nsinstall(argv): if options.D: if len(args) != 1: return 1 - if os.path.exists(args[0]): + try: + if options.m: + os.makedirs(args[0], options.m) + else: + os.makedirs(args[0]) + except FileExistsError: if not os.path.isdir(args[0]): sys.stderr.write('nsinstall: ' + args[0] + ' is not a directory\n') sys.exit(1) if options.m: os.chmod(args[0], options.m) - sys.exit() - if options.m: - os.makedirs(args[0], options.m) - else: - os.makedirs(args[0]) return 0 # nsinstall arg1 [...] directory |