Compare commits
No commits in common. "3dfd09cc81cbaf60a58b373f2e94ac77678dd767" and "2446f36375b7bd8d6a92dca480e6d6f82b2f8b7c" have entirely different histories.
3dfd09cc81
...
2446f36375
2 changed files with 8 additions and 9 deletions
|
@ -54,4 +54,4 @@ milter_protocol = 6
|
||||||
milter_default_action = accept
|
milter_default_action = accept
|
||||||
|
|
||||||
# rspamd
|
# rspamd
|
||||||
milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
|
milter_mail_macros = "i {mail_addr} {client_addr} {client_name} {auth_authen}"
|
||||||
|
|
15
libs/apt.py
15
libs/apt.py
|
@ -11,10 +11,9 @@ class AptSource():
|
||||||
# parse options, which are optional
|
# parse options, which are optional
|
||||||
if search(r'\[.*\]', string):
|
if search(r'\[.*\]', string):
|
||||||
self.options = {
|
self.options = {
|
||||||
k:v.split(',')
|
k:v.split(',') for k,v in (
|
||||||
for k,v in (
|
e.split('=') for e in search(r'\[(.*)\]', string)[1].split()
|
||||||
e.split('=') for e in search(r'\[(.*)\]', string)[1].split()
|
)
|
||||||
)
|
|
||||||
}
|
}
|
||||||
string_without_options = sub(r'\[.*\]', '', string)
|
string_without_options = sub(r'\[.*\]', '', string)
|
||||||
else:
|
else:
|
||||||
|
@ -27,7 +26,7 @@ class AptSource():
|
||||||
self.url = urlparse(parts[1])
|
self.url = urlparse(parts[1])
|
||||||
self.suite = parts[2]
|
self.suite = parts[2]
|
||||||
self.components = parts[3:]
|
self.components = parts[3:]
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
parts = [
|
parts = [
|
||||||
self.type,
|
self.type,
|
||||||
|
@ -48,13 +47,13 @@ class AptSource():
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
return ' '.join(parts)
|
return ' '.join(parts)
|
||||||
|
|
||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
return str(self) == str(other)
|
return str(self) == str(other)
|
||||||
|
|
||||||
def __lt__(self, other):
|
def __lt__(self, other):
|
||||||
return str(self) < str(other)
|
return str(self) < str(other)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue