Uploaded image for project: 'Cost Management'
  1. Cost Management
  2. COST-2335

nise should give a failure when static file does not exist

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • 2022Q1
    • None
    • Nise
    • None

      When the static file that is given on the cli  does not exist we should handle the exception and give a cleaner error message.

      What we see today:

      (nise) bash-3.2$ nise report aws --static-report-file ./does_not_exists
      Traceback (most recent call last):
        File "/Users/dougdonahue/.local/share/virtualenvs/nise-5t57SMBa/bin/nise", line 33, in <module>
          sys.exit(load_entry_point('koku-nise==2.6.0', 'console_scripts', 'nise')())
        File "/Users/dougdonahue/.local/share/virtualenvs/nise-5t57SMBa/lib/python3.8/site-packages/koku_nise-2.6.0-py3.8.egg/nise/_main_.py", line 655, in main
          run(provider_type, options)
        File "/Users/dougdonahue/.local/share/virtualenvs/nise-5t57SMBa/lib/python3.8/site-packages/koku_nise-2.6.0-py3.8.egg/nise/_main_.py", line 617, in run
          static_data_bool = _load_static_report_data(options)
        File "/Users/dougdonahue/.local/share/virtualenvs/nise-5t57SMBa/lib/python3.8/site-packages/koku_nise-2.6.0-py3.8.egg/nise/_main_.py", line 526, in _load_static_report_data
          for generator_dict in static_report_data.get("generators"):
      AttributeError: 'str' object has no attribute 'get'

            ddonahue007 Doug Donahue
            ddonahue007 Doug Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: