From 6f70c482fb4c1938d0eaa0bb3e7d952e81328ac4 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 13 Jul 2018 15:56:46 -0400 Subject: [PATCH] untangle.py: allow version "14" and make it the default. --- src/untangle/untangle.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/untangle/untangle.py b/src/untangle/untangle.py index 681135a..05b2cfe 100644 --- a/src/untangle/untangle.py +++ b/src/untangle/untangle.py @@ -22,8 +22,8 @@ class Untangle: self.base_url = 'https://' + self.host + '/' # This never changes # Sanity check the numerical version. - self.version = s.get('version', '13.1') - if self.version not in ['9', '10', '11', '12', '13', '13.1']: + self.version = s.get('version', '14') + if self.version not in ['9', '10', '11', '12', '13', '13.1', '14']: msg = 'Invalid version "' + self.version + '" ' msg += 'in section "' + s.name + '"' raise configparser.ParsingError(msg) @@ -110,9 +110,11 @@ class Untangle: elif self.version in ['10', '11', '12', '13']: # The procedure for v11, v12, or v13 is the same as for v10. return self.get_backup_v10() - elif self.version == '13.1': + elif self.version in ['13.1', '14']: # But the minor update v13.1 moved the backup URL. return self.get_backup_v13_1() + else + raise ValueError('unknown version %s' % self.version) def get_backup_v9(self): -- 2.44.2