Index: unittests/repo_test_util.py |
diff --git a/unittests/repo_test_util.py b/unittests/repo_test_util.py |
index fc2b4f2f6cfc6a351f0f3fba0be1cdffe5a7ec1b..8908bca14b50128125594fd72c340ff15251252f 100644 |
--- a/unittests/repo_test_util.py |
+++ b/unittests/repo_test_util.py |
@@ -123,9 +123,7 @@ |
self._recipe_tool, |
os.path.join(repo_dir, 'infra', 'config', 'recipes.cfg')), |
])) |
- with open('some_file', 'w') as f: |
- print >> f, 'I\'m a file' |
- subprocess.check_output(['git', 'add', 'recipes.py', 'some_file']) |
+ subprocess.check_output(['git', 'add', 'recipes.py']) |
rev = self.update_recipes_cfg(name, spec) |
return { |
'name': name, |
@@ -197,11 +195,10 @@ |
env = dict(os.environ) |
env['GIT_AUTHOR_NAME'] = author_name |
env['GIT_AUTHOR_EMAIL'] = author_email |
- with open(os.path.join(root, 'some_file'), 'a') as f: |
- print >> f, message |
subprocess.check_output( |
['git', '-C', root, 'commit', |
- '-a', '-m', message], env=env) |
+ '-a', '--allow-empty', |
+ '-m', message], env=env) |
rev = subprocess.check_output( |
['git', '-C', root, 'rev-parse', 'HEAD']).strip() |
return { |