parent
							
								
									71f865da3f
								
							
						
					
					
						commit
						00c8a5897b
					
				| @ -29,7 +29,7 @@ from sugar.activity import registry | |||||||
| from sugar import util | from sugar import util | ||||||
| from sugar import env | from sugar import env | ||||||
| 
 | 
 | ||||||
| from errno import EEXIST | from errno import EEXIST, ENOSPC | ||||||
| 
 | 
 | ||||||
| import os | import os | ||||||
| 
 | 
 | ||||||
| @ -150,6 +150,9 @@ def open_log_file(activity): | |||||||
|         except OSError, e: |         except OSError, e: | ||||||
|             if e.errno == EEXIST: |             if e.errno == EEXIST: | ||||||
|                 i += 1 |                 i += 1 | ||||||
|  |             elif e.errno == ENOSPC: | ||||||
|  |                 # not the end of the world; let's try to keep going. | ||||||
|  |                 return ('/dev/null', open('/dev/null','w')) | ||||||
|             else: |             else: | ||||||
|                 raise e |                 raise e | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -43,7 +43,7 @@ def get_profile_path(path=None): | |||||||
|         return base |         return base | ||||||
| 
 | 
 | ||||||
| def get_logs_path(path=None): | def get_logs_path(path=None): | ||||||
|     base = get_profile_path('logs') |     base = os.environ.get('SUGAR_LOGS_DIR', get_profile_path('logs')) | ||||||
|     if path != None: |     if path != None: | ||||||
|         return os.path.join(base, path) |         return os.path.join(base, path) | ||||||
|     else: |     else: | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Marco Pesenti Gritti
						Marco Pesenti Gritti