From: Michael Orlitzky Date: Thu, 12 May 2016 12:53:13 +0000 (-0400) Subject: Add nominal support for Untangle v12 (which is the same as v11). X-Git-Tag: 0.0.4~3 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=untangle-https-backup.git;a=commitdiff_plain;h=4139a215c947d187f2c30004088cfe58d294c6fb Add nominal support for Untangle v12 (which is the same as v11). --- diff --git a/doc/man8/untangle-https-backup.8 b/doc/man8/untangle-https-backup.8 index 488cb1e..419112e 100644 --- a/doc/man8/untangle-https-backup.8 +++ b/doc/man8/untangle-https-backup.8 @@ -41,9 +41,9 @@ The hostname or IP address where the Untangle web UI is available. The Untangle admin username. .IP \fBpassword\fR\ (required) The Untangle admin password. -.IP \fBversion\fR\ (default:\ \fI11\fR) -The version of Untangle running on this host. Currently only \fI9\fR -and \fI11\fR are supported. +.IP \fBversion\fR\ (default:\ \fI12\fR) +The version of Untangle running on this host. Currently only \fI9\fR, +\fI11\fR, and \fI12\fR are supported. .IP \fBverify_cert\fR\ (default:\ False) Whether or not to verify the site's SSL certificate, either \fITrue\fR or \fIFalse\fR. diff --git a/src/untangle/untangle.py b/src/untangle/untangle.py index 6a97280..f8fd795 100644 --- a/src/untangle/untangle.py +++ b/src/untangle/untangle.py @@ -18,7 +18,7 @@ class Untangle: self.host = s['host'] self.username = s.get('username', 'admin') self.password = s['password'] - self.version = int(s.get('version', '11')) + self.version = int(s.get('version', '12')) self.base_url = 'https://' + self.host + '/' # This never changes # Sanity check the numerical version. @@ -81,6 +81,9 @@ class Untangle: return self.get_backup_v9() elif self.version == 11: return self.get_backup_v11() + elif self.version == 12: + # The procedure for v12 is the same as for v11. + return self.get_backup_v11() def get_backup_v9(self):