mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-11 09:48:24 +02:00
ddns: Add more upstream patches.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
commit f62fa5baffe2d225604460ecd03b8159b987df8f
|
||||
Author: Michael Tremer <michael.tremer@ipfire.org>
|
||||
Date: Sun Apr 26 20:15:33 2015 +0200
|
||||
|
||||
database: Open database for the search operations, too
|
||||
|
||||
diff --git a/src/ddns/database.py b/src/ddns/database.py
|
||||
index 42c3433..70a7363 100644
|
||||
--- a/src/ddns/database.py
|
||||
+++ b/src/ddns/database.py
|
||||
@@ -122,6 +122,9 @@ class DDNSDatabase(object):
|
||||
"""
|
||||
Returns the timestamp of the last update (with the given status code).
|
||||
"""
|
||||
+ if self._db is None:
|
||||
+ self._db = self._open_database(self.path)
|
||||
+
|
||||
c = self._db.cursor()
|
||||
|
||||
try:
|
||||
@@ -141,6 +144,9 @@ class DDNSDatabase(object):
|
||||
"""
|
||||
Returns the update status of the last update.
|
||||
"""
|
||||
+ if self._db is None:
|
||||
+ self._db = self._open_database(self.path)
|
||||
+
|
||||
c = self._db.cursor()
|
||||
|
||||
try:
|
||||
@@ -156,6 +162,9 @@ class DDNSDatabase(object):
|
||||
"""
|
||||
Returns the reason string for the last failed update (if any).
|
||||
"""
|
||||
+ if self._db is None:
|
||||
+ self._db = self._open_database(self.path)
|
||||
+
|
||||
c = self._db.cursor()
|
||||
|
||||
try:
|
||||
Reference in New Issue
Block a user