domogik / domogik

Domogik Free Home Automation software
Other
116 stars 39 forks source link

reviews.py #451

Open tikismoke opened 7 years ago

tikismoke commented 7 years ago
Traceback (most recent call last):
  File "./review.py", line 372, in <module>
    R = Review(pkg_dir)
  File "./review.py", line 60, in __init__
    self.check_design()
  File "./review.py", line 220, in check_design
    h, w = self.get_image_size(os.path.join(self.pkg_dir, "design/icon.png"))
  File "./review.py", line 231, in get_image_size
    size = os.path.getsize(file_path)
  File "/usr/lib/python2.7/genericpath.py", line 49, in getsize
    return os.stat(filename).st_size
OSError: [Errno 2] No such file or directory: '/home/domogik-plugin-ebusd/design/icon.png'

Indeed the file do not exists.

tikismoke commented 7 years ago

And also this on unexisting dir:

root@domogik:/home/domogik/src/domogik/tools/packages# ./review.py /home/domogik-plugin-k
INFO     : Package location : /home/domogik-plugin-k

===========================================================
   Read the json file
===========================================================

ERROR    : Unable to read the 'info.json' file as a Json file! Error is : Traceback (most recent call last):
  File "./review.py", line 131, in load_json
    self.json_data = json.load(open(os.path.join(self.pkg_dir, "info.json")))
IOError: [Errno 2] No such file or directory: '/home/domogik-plugin-k/info.json'

ERROR    : Unable to read some 'info.json' identity informations! Error is : Traceback (most recent call last):
  File "./review.py", line 137, in read_identity
    self.pkg_type = self.json_data["identity"]["type"]
AttributeError: Review instance has no attribute 'json_data'

Traceback (most recent call last):
  File "./review.py", line 372, in <module>
    R = Review(pkg_dir)
  File "./review.py", line 42, in __init__
    self.read_identity()
  File "./review.py", line 146, in read_identity
    self.info("Package type                : {0}".format(self.pkg_type))
AttributeError: Review instance has no attribute 'pkg_type'