projects
/
mirror
/
userdir-ldap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d0e9a9
)
ud-mailgate: Assign value before check and drop semicolon
author
James Clarke
<jrtc27@debian.org>
Sat, 6 Apr 2019 21:19:58 +0000
(21:19 +0000)
committer
James Clarke
<jrtc27@debian.org>
Sat, 6 Apr 2019 21:19:58 +0000
(21:19 +0000)
ud-mailgate
patch
|
blob
|
history
diff --git
a/ud-mailgate
b/ud-mailgate
index
02693b6
..
32985d1
100755
(executable)
--- a/
ud-mailgate
+++ b/
ud-mailgate
@@
-192,11
+192,10
@@
def DoArbChange(Str, Attrs):
if attrName not in ArbChanges:
return None
- if re.match(ArbChanges[attrName], G[1]) is None:
+ value = G[1]
+ if re.match(ArbChanges[attrName], value) is None:
raise UDFormatError("Item does not match the required format" + ArbChanges[attrName])
- value = G[1];
-
Attrs.append((ldap.MOD_REPLACE, attrName, value))
return "Changed entry %s to %s" % (attrName, value)