Skip to content

Commit

Permalink
fix: SafeConfigParser renamed to ConfigParser (#46)
Browse files Browse the repository at this point in the history
* fix: SafeConfigParser renamed to ConfigParser

after latest system update this error has popped up:
```
archey3:862: DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in future versions. Use ConfigParser directly instead.
  config = ArcheyConfigParser()
Traceback (most recent call last):
  File "/usr/bin/archey3", line 805, in parse_display
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/archey3", line 869, in <module>
    main()
  File "/usr/bin/archey3", line 866, in main
    archey.run(options.screenshot)
  File "/usr/bin/archey3", line 728, in run
    print(self.render())
  File "/usr/bin/archey3", line 734, in render
    results = self.prepare_results()
  File "/usr/bin/archey3", line 753, in prepare_results
    for cls_name, args in self.parse_display():
RuntimeError: generator raised StopIteration
```

* Update archey3

also remove StopIteration exeption
  • Loading branch information
Elin Angelov authored and lclarkmichalek committed Aug 11, 2018
1 parent 1c7e137 commit 02ec857
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions archey3
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ class systemUpgrade(display):

#------------ Config -----------

class ArcheyConfigParser(configparser.SafeConfigParser):
class ArcheyConfigParser(configparser.ConfigParser):
"""
A parser for the archey config file.
"""
Expand Down Expand Up @@ -802,7 +802,6 @@ class Archey(object):
args = ()

yield groups["func"], args
raise StopIteration

def format_item(self, item):
title = item[0].rstrip(':')
Expand Down

0 comments on commit 02ec857

Please sign in to comment.