Konstantine Rybnikov committed a6f54b5

add file even if it doesn't exist

Comments (0)

Files changed (1)

     def set_files(self, possible_files, base_path='.'):
         for file_ in possible_files:
-            file_path = os.path.join(base_path,
-                                     os.path.join(self.prefix,
-                                                  file_))
+            file_path = os.path.join(base_path, self.prefix, file_)
             if not os.path.exists(file_path):
                 log.warning(u'File %s does not exist' % file_path)
             elif not os.path.isfile(file_path):
                 log.warning(u'File %s is not a file (directory maybe?)' % file_path)
-            else:
-                self.files.append(file_)
+            self.files.append(file_)
     def __contains__(self, filename):
         return filename in self.files
         for filename in self.merge_groups[group_name].files:
-                             os.path.join(self.merge_groups[group_name].prefix,
-                                          filename)), 'r', 'utf-8') as f:
+                             self.merge_groups[group_name].prefix,
+                             filename), 'r', 'utf-8') as f:
                 ret_val += f.readlines()
         return ret_val
         with (
-                    os.path.join(self.merge_groups[group_name].prefix,
-                                 self.merge_groups[group_name].name)),
+                    self.merge_groups[group_name].prefix,
+                    self.merge_groups[group_name].name),
                 'w', 'utf-8')) as f:
     def get_group_by_filename(self, filename):
         """Returns None if there's no group for that file
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.