diff options
-rw-r--r-- | src/pyfedpkg/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index b4d1a91..bf5fb12 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -611,8 +611,9 @@ class PackageModule: # now process the upload files self.new_sources(uploadfiles) # And finally add all the files we know about (and our stock files) - files.append('.gitignore') - files.append('sources') + for file in ('.gitignore', 'sources'): + if os.path.exists(file): + files.append(file) rv = self.repo.index.add(files) # Return to the caller and let them take it from there. os.chdir(oldpath) |