Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6897c8f authored by Tianjie Xu's avatar Tianjie Xu Committed by Gerrit Code Review
Browse files

Merge "More accurate error if input_file is not exists"

parents 20740571 92be6ee9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -187,6 +187,9 @@ def ImgFromTargetFiles(input_file, output_file):
  Raises:
    ValueError: On invalid input.
  """
  if not os.path.exists(input_file):
    raise ValueError('%s is not exist' % input_file)

  if not zipfile.is_zipfile(input_file):
    raise ValueError('%s is not a valid zipfile' % input_file)