summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-10-30 21:08:21 +0100
committerMichał Górny <mgorny@gentoo.org>2017-10-30 22:01:41 +0100
commit8e52872cced3b2e43aa4a45e313f35f792c2e3ae (patch)
tree0609658988439c853406243a3655e26132dec805
parent5101b85ae250726a7d9d9068cec31dfa9559c0ad (diff)
downloadgemato-8e52872cced3b2e43aa4a45e313f35f792c2e3ae.tar.gz
cli: Do not require full file path for 'create' action
-rw-r--r--gemato/cli.py2
-rw-r--r--tests/test_recursiveloader.py9
2 files changed, 6 insertions, 5 deletions
diff --git a/gemato/cli.py b/gemato/cli.py
index b90bbf8..49add27 100644
--- a/gemato/cli.py
+++ b/gemato/cli.py
@@ -173,7 +173,7 @@ def do_create(args, argp):
start = timeit.default_timer()
try:
m = gemato.recursiveloader.ManifestRecursiveLoader(
- p, **init_kwargs)
+ os.path.join(p, 'Manifest'), **init_kwargs)
except gemato.exceptions.OpenPGPNoImplementation as e:
logging.error(str(e))
return 1
diff --git a/tests/test_recursiveloader.py b/tests/test_recursiveloader.py
index 8f0a830..cc4d3b9 100644
--- a/tests/test_recursiveloader.py
+++ b/tests/test_recursiveloader.py
@@ -2361,7 +2361,7 @@ class CreateNewManifestTest(TempDirTestCase):
def test_cli(self):
self.assertEqual(
gemato.cli.main(['gemato', 'create', '--hashes=SHA256 SHA512',
- self.path]),
+ self.dir]),
0)
m2 = gemato.manifest.ManifestFile()
@@ -2453,7 +2453,7 @@ class CreateNewManifestTest(TempDirTestCase):
gemato.cli.main(['gemato', 'create',
'--hashes=SHA256 SHA512',
'--compress-watermark=0',
- os.path.join(self.dir, 'Manifest')]),
+ self.dir]),
0)
self.assertFalse(os.path.exists(
os.path.join(self.dir, 'Manifest')))
@@ -2465,7 +2465,7 @@ class CreateNewManifestTest(TempDirTestCase):
gemato.cli.main(['gemato', 'create',
'--hashes=SHA256 SHA512',
'--compress-watermark=4096',
- os.path.join(self.dir, 'Manifest')]),
+ self.dir]),
0)
self.assertFalse(os.path.exists(
os.path.join(self.dir, 'Manifest.gz')))
@@ -2519,7 +2519,8 @@ class CreateNewCompressedManifestTest(TempDirTestCase):
def test_cli(self):
self.assertEqual(
gemato.cli.main(['gemato', 'create', '--hashes=SHA256 SHA512',
- self.path]),
+ '--compress-watermark=0', '--compress-format=gz',
+ self.dir]),
0)
m2 = gemato.manifest.ManifestFile()