Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
I
inary
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
1
Konular (issue)
1
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
inary
Commits
d00b445b
Kaydet (Commit)
d00b445b
authored
May 13, 2020
tarafından
kuesji
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
eğer /etc/inary/inary.conf bulunamazsa o anki klasörde conf dosyasına bakılır
üst
24376962
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
config.py
inary/config.py
+9
-1
No files found.
inary/config.py
Dosyayı görüntüle @
d00b445b
...
...
@@ -19,6 +19,7 @@ regular INARY configurations.
import
copy
import
os
from
pathlib
import
Path
# Gettext Library
import
gettext
...
...
@@ -51,8 +52,15 @@ class Config(object, metaclass=util.Singleton):
def
__init__
(
self
,
options
=
Options
()):
self
.
set_options
(
options
)
self
.
values
=
inary
.
configfile
.
ConfigurationFile
(
"/etc/inary/inary.conf"
)
if
Path
(
"/etc/inary/inary.conf"
)
.
is_file
():
self
.
values
=
inary
.
configfile
.
ConfigurationFile
(
"/etc/inary/inary.conf"
)
elif
Path
(
"inary.conf"
)
.
is_file
():
self
.
values
=
inary
.
configfile
.
ConfigurationFile
(
"inary.conf"
)
else
:
# config not found but class needed
self
.
values
=
inary
.
configfile
.
ConfigurationFile
(
""
)
# get the initial environment variables. this is needed for
# build process.
self
.
environ
=
copy
.
deepcopy
(
os
.
environ
)
...
...
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