tests: fix clearing 'updates pending' flag test

This commit is contained in:
Marek Marczykowski-Górecki 2016-06-24 00:17:16 +02:00
parent ae44869499
commit 504360ba9a
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -266,7 +266,8 @@ Test package
open(self.update_flag_path, 'a').close()
# remove also repodata to test #1685
shutil.rmtree('/var/lib/qubes/updates/repodata')
if os.path.exists('/var/lib/qubes/updates/repodata'):
shutil.rmtree('/var/lib/qubes/updates/repodata')
logpath = os.path.join(self.tmpdir, 'dom0-update-output.txt')
try:
subprocess.check_call(['sudo', 'qubes-dom0-update', '-y',