On 01/14/2015 12:35 PM, Petr Viktorin wrote:
> On 01/14/2015 09:14 AM, Martin Kosek wrote:
>> On 01/13/2015 06:02 PM, Jan Cholasta wrote:
> 
>>> Rebased again, patch attached.
>>
>> Given that Petr is not there today, I finished the review for him. I did not
>> find any other issues, all issues except (2) are fixed.
>>
>> ACK. Pushed to master (rebased) and ipa-4-1.
> 
> This broke master.
> 
> ************* Module ipaserver.install.ipa_restore
> ipaserver/install/ipa_restore.py:175: [E0602(undefined-variable),
> Restore.validate_options] Undefined variable 'BACKUP_DIR')
> ipaserver/install/ipa_restore.py:210: [E0602(undefined-variable), Restore.run]
> Undefined variable 'BACKUP_DIR')
> 

Grr... Sorry for the hickup, I fixed it with the attached patch and pushed it
to master as a one liner.
From 35c4fa2e36a83ad80c79a21ac8e495985f38dbde Mon Sep 17 00:00:00 2001
From: Martin Kosek <mko...@redhat.com>
Date: Wed, 14 Jan 2015 13:05:09 +0100
Subject: [PATCH] Fix IPA_BACKUP_DIR path name

Path name was not updated during patch rebase.

https://fedorahosted.org/freeipa/ticket/4797
---
 ipaserver/install/ipa_restore.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ipaserver/install/ipa_restore.py b/ipaserver/install/ipa_restore.py
index 9d308eff657e7b6223b9597d741af091268801ad..d93ddc79ecacdf660359d0db7831285ba7e0e3cb 100644
--- a/ipaserver/install/ipa_restore.py
+++ b/ipaserver/install/ipa_restore.py
@@ -172,7 +172,7 @@ def validate_options(self):
 
         dirname = self.args[0]
         if not os.path.isabs(dirname):
-            dirname = os.path.join(BACKUP_DIR, dirname)
+            dirname = os.path.join(paths.IPA_BACKUP_DIR, dirname)
         if not os.path.isdir(dirname):
             parser.error("must provide path to backup directory")
 
@@ -207,7 +207,7 @@ def run(self):
 
         self.backup_dir = self.args[0]
         if not os.path.isabs(self.backup_dir):
-            self.backup_dir = os.path.join(BACKUP_DIR, self.backup_dir)
+            self.backup_dir = os.path.join(paths.IPA_BACKUP_DIR, self.backup_dir)
 
         self.log.info("Preparing restore from %s on %s",
                       self.backup_dir, api.env.host)
-- 
1.9.3

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to