diff options
| author | Sarah Owens <sarato@inkylabs.com> | 2012-10-25 17:53:09 -0700 |
|---|---|---|
| committer | Sarah Owens <sarato@inkylabs.com> | 2012-10-31 09:11:16 -0700 |
| commit | 60798a32f6e42377b70a715b5c1cd21e7950d00f (patch) | |
| tree | 6719d9a3d74ca6c253a5891368fad0c49af0ed53 | |
| parent | 57365c98cc227255f50ab3d71462204c804eb975 (diff) | |
| download | git-repo-60798a32f6e42377b70a715b5c1cd21e7950d00f.tar.gz | |
Use 'stat' package instead of literals for mkdir()
This is part of a series of changes to introduce Python3 support.
Change-Id: Ic988ad181d32357d82dfa554e70d8525118334c0
| -rwxr-xr-x | repo | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -88,6 +88,7 @@ REPO_MAIN = S_repo + '/main.py' # main script | |||
| 88 | import optparse | 88 | import optparse |
| 89 | import os | 89 | import os |
| 90 | import re | 90 | import re |
| 91 | import stat | ||
| 91 | import subprocess | 92 | import subprocess |
| 92 | import sys | 93 | import sys |
| 93 | import urllib2 | 94 | import urllib2 |
| @@ -276,7 +277,7 @@ def _SetupGnuPG(quiet): | |||
| 276 | 277 | ||
| 277 | if not os.path.isdir(gpg_dir): | 278 | if not os.path.isdir(gpg_dir): |
| 278 | try: | 279 | try: |
| 279 | os.mkdir(gpg_dir, 0700) | 280 | os.mkdir(gpg_dir, stat.S_IRWXU) |
| 280 | except OSError as e: | 281 | except OSError as e: |
| 281 | print >>sys.stderr, \ | 282 | print >>sys.stderr, \ |
| 282 | 'fatal: cannot make %s directory: %s' % ( | 283 | 'fatal: cannot make %s directory: %s' % ( |
