Skip to content

Commit

Permalink
python:tests: Use bin/tdbdump only if built
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Schneider <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
  • Loading branch information
cryptomilk authored and abartlet committed Nov 24, 2017
1 parent 667335a commit 84a7bae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/samba/tests/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ def test_flush(self):
self.assertIsNone(self.hive.set_value('foo2', 1, 'bar2'))
self.assertIsNone(self.hive.flush())

proc = Popen(['bin/tdbdump', self.hive_path], stdout=PIPE, stderr=PIPE)
tdbdump_tool = 'tdbdump'
if os.path.isfile('bin/tdbdump'):
tdbdump_tool = 'bin/tdbdump'

proc = Popen([tdbdump_tool, self.hive_path], stdout=PIPE, stderr=PIPE)
tdb_dump, err = proc.communicate()
self.assertTrue(b'DN=VALUE=FOO2,HIVE=NONE' in tdb_dump)

Expand Down

0 comments on commit 84a7bae

Please sign in to comment.