Skip to content

Commit

Permalink
Fixed file mask format
Browse files Browse the repository at this point in the history
  • Loading branch information
yurivict committed May 17, 2015
1 parent 378cdff commit 8d5b924
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tiny_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def tm_log():
return datetime.datetime.now().strftime('[%Y-%m-%d %H:%M:%S %Z]')

def mk_file_rw(fname):
fh = os.open (fname, os.O_CREAT, 0600)
fh = os.open(fname, os.O_CREAT, 0o0600)
os.close(fh)

def drop_privileges3(uid_name, gid_name, files):
Expand Down Expand Up @@ -68,7 +68,7 @@ def write_pid_file2(fname, pid):
f = open(fname, 'w')
f.write(p)
f.close()
os.chmod(fname, 0400)
os.chmod(fname, 0o0400)
# there should always be the matching atexit.register(os.remove)

def write_pid_file(f):
Expand Down

0 comments on commit 8d5b924

Please sign in to comment.