Commit 3341849a authored by szager@chromium.org's avatar szager@chromium.org

Don't os.listdir() on a non-existent dir (it raises).

TBR=agable@chromium.org,iannucci@chromium.org
BUG=

Review URL: https://codereview.chromium.org/342753003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@278141 0039d316-1c4b-4281-b951-d872f2087c98
parent b0a13a2a
......@@ -399,6 +399,8 @@ class Mirror(object):
@staticmethod
def DeleteTmpPackFiles(path):
pack_dir = os.path.join(path, 'objects', 'pack')
if not os.path.isdir(pack_dir):
return
pack_files = [f for f in os.listdir(pack_dir) if
f.startswith('.tmp-') or f.startswith('tmp_pack_')]
for f in pack_files:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment