Changeset 3985
- Timestamp:
- 02/12/09 01:48:01 (4 years ago)
- Location:
- branch/UMPA
- Files:
-
- 2 modified
-
tests/unit/test_init.py (modified) (1 diff)
-
umpa/__init__.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branch/UMPA/tests/unit/test_init.py
r3984 r3985 32 32 cls.tmp_dir = tempfile.mkdtemp() 33 33 os.path.expanduser = expanduser 34 # TODO: make a test for commented lines but clean .umpa and 35 # re-import umpa after creating dirs 36 #os.makedirs(os.path.join(cls.tmp_dir, '.umpa')) 37 #os.makedirs(os.path.join(cls.tmp_dir, '.umpa', 'umpa_plugins', 38 # 'protocols')) 34 39 import umpa 35 40 -
branch/UMPA/umpa/__init__.py
r3981 r3985 48 48 local_path = os.path.join(os.path.expanduser('~'), '.umpa') 49 49 50 # checking if local directory exists 51 if not os.path.isdir(local_path): 52 os.makedirs(os.path.join(local_path, 'umpa_plugins', 'protocols')) 53 os.mkdir(os.path.join(local_path, 'umpa_plugins', 'extensions')) 50 for dir in ('protocols', 'extensions'): 51 try: 52 os.makedirs(os.path.join(local_path, 'umpa_plugins', dir)) 53 except OSError, err: 54 if err.errno != 17: # skip if dir exists 55 raise 54 56 55 57 # to allow things like: from umpa_plugins.extensions import something
