[skeleton] the new implementation of data_files will never raise a OSError stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 10 Jul 2009 09:36:33 +0200
branchstable
changeset 2367 6ba269240f3b
parent 2366 e4229723b824
child 2368 b41aef0e63a7
[skeleton] the new implementation of data_files will never raise a OSError
skeleton/__pkginfo__.py.tmpl
--- a/skeleton/__pkginfo__.py.tmpl	Thu Jul 09 20:13:54 2009 +0200
+++ b/skeleton/__pkginfo__.py.tmpl	Fri Jul 10 09:36:33 2009 +0200
@@ -34,21 +34,16 @@
             and not fname.endswith('~')
             and not isdir(join(dirpath, fname))]
 
-try:
-    data_files = [
-        # common files
-        [THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
-        ]
-    # check for possible extended cube layout
-    for dirname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data', 'i18n', 'migration'):
-        if isdir(dirname):
-            data_files.append([join(THIS_CUBE_DIR, dirname), listdir(dirname)])
-    # Note: here, you'll need to add subdirectories if you want
-    # them to be included in the debian package
-except OSError:
-    if exists(dirname(__file__)):
-        raise
-    # we are in an installed directory
+data_files = [
+    # common files
+    [THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
+    ]
+# check for possible extended cube layout
+for dirname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data', 'i18n', 'migration'):
+    if isdir(dirname):
+        data_files.append([join(THIS_CUBE_DIR, dirname), listdir(dirname)])
+# Note: here, you'll need to add subdirectories if you want
+# them to be included in the debian package
 
 
 cube_eid = None # <=== FIXME if you need direct bug-subscription