Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Oskar Roesler
ros-aur-helpers
Commits
59d66b24
Verified
Commit
59d66b24
authored
Dec 06, 2020
by
Oskar Roesler
Browse files
Move CONFIG_ROOT into Routines class, add CACHE_ROOT
parent
c3154c54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
aurci/general.py
aurci/general.py
+3
-2
No files found.
aurci/general.py
View file @
59d66b24
...
...
@@ -9,6 +9,8 @@ import re
import
configparser
class
Routines
:
CONFIG_ROOT
=
os
.
environ
.
get
(
"XDG_CONFIG_HOME"
,
os
.
path
.
join
(
Path
.
home
(),
".config/"
))
CACHE_ROOT
=
os
.
environ
.
get
(
"XDG_CACHE_HOME"
,
os
.
path
.
join
(
Path
.
home
(),
".cache/"
))
def
__init__
(
self
,
package
=
None
,
verbosity
=
False
,
output
=
True
):
self
.
package
=
package
...
...
@@ -22,8 +24,7 @@ class Routines:
@
staticmethod
def
get_config
():
CONFIG_ROOT
=
os
.
environ
.
get
(
"XDG_CONFIG_HOME"
,
os
.
path
.
join
(
Path
.
home
(),
".config/"
))
config_path
=
os
.
path
.
join
(
CONFIG_ROOT
,
'ros-aur-helper'
,
'config.ini'
)
config_path
=
os
.
path
.
join
(
Routines
.
CONFIG_ROOT
,
'ros-aur-helper'
,
'config.ini'
)
if
not
os
.
path
.
exists
(
config_path
):
shutil
.
copy
(
'config_example.ini'
,
config_path
)
config
=
configparser
.
ConfigParser
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment