Bug 4026 - Hiveconf crashes if no config files
Summary: Hiveconf crashes if no config files
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Other (show other bugs)
Version: 3.2.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Peter Åstrand
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-13 10:47 CEST by Peter Åstrand
Modified: 2024-08-27 17:27 CEST (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments

Description Peter Åstrand cendio 2011-10-13 10:47:43 CEST
When conf.d is empty, one gets:

Traceback (most recent call last):
  File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 1158, in <module>
    main()
  File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 1082, in main
    ask_for_admin_email()
  File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 575, in ask_for_admin_email
    addr = hive.get_string("/vsmserver/admin_email", "")
AttributeError: 'NoneType' object has no attribute 'get_string'
Comment 1 Emil Lock cendio 2023-07-10 13:37:22 CEST
The specific example shown above with tl-setup was resolved in commit r24506,
we should however still look into how to handle this problem more generally.
Comment 2 Emil Lock cendio 2023-07-14 13:12:31 CEST
This issue is caused by hiveconf.open_hive() returning None when failing to open the hive file (this is following the hiveconf specification). Because of this we always need to check that open_hive() doesn't return None before we can continue.

Note You need to log in before you can comment on or make changes to this bug.