|
291 |
ACL.process( '' ) |
291 |
ACL.process( '' ) |
292 |
|
292 |
|
293 |
def _read_from_file( self, username ): |
293 |
def _read_from_file( self, username ): |
|
|
294 |
if isinstance(username, unicode): |
295 |
username = username.encode('UTF-8') |
294 |
filename = os.path.join( ACLs.CACHE_DIR, username ) |
296 |
filename = os.path.join( ACLs.CACHE_DIR, username ) |
295 |
|
297 |
|
296 |
try: |
298 |
try: |
|
320 |
self.acls.append( rule ) |
322 |
self.acls.append( rule ) |
321 |
|
323 |
|
322 |
def _write_to_file( self, username ): |
324 |
def _write_to_file( self, username ): |
|
|
325 |
if isinstance(username, unicode): |
326 |
username = username.encode('UTF-8') |
323 |
filename = os.path.join( ACLs.CACHE_DIR, username ) |
327 |
filename = os.path.join( ACLs.CACHE_DIR, username ) |
324 |
|
328 |
|
325 |
file = os.open( filename, os.O_WRONLY | os.O_TRUNC | os.O_CREAT, 0600 ) |
329 |
file = os.open( filename, os.O_WRONLY | os.O_TRUNC | os.O_CREAT, 0600 ) |