Blob Blame History Raw
From ad0c452d85b962b1e960fc9deac6338010509192 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Thu, 17 Apr 2014 17:49:13 -0700
Subject: [PATCH 2/2] ostreesetup: Fix noGpg attribute

Since we're using setToSelf, we need to be consistent with our
attribute name.

Related: rhbz#1113535
Port of rpmostreepayload patches from master
commit f54112f27a9ce90c7a7adfc595fe9e332f54629a
---
 pykickstart/commands/ostreesetup.py | 4 ++--
 tests/commands/ostreesetup.py       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pykickstart/commands/ostreesetup.py b/pykickstart/commands/ostreesetup.py
index 269d91f..3b0f335 100644
--- a/pykickstart/commands/ostreesetup.py
+++ b/pykickstart/commands/ostreesetup.py
@@ -33,7 +33,7 @@ class RHEL7_OSTreeSetup(KickstartCommand):
         self.remote = kwargs.get("remote", self.osname)
         self.url = kwargs.get('url', None)
         self.ref = kwargs.get('ref', None)
-        self.noGpg = kwargs.get('noGpg', False)
+        self.nogpg = kwargs.get('nogpg', False)
 
     def __str__(self):
         retval = KickstartCommand.__str__(self)
@@ -54,7 +54,7 @@ class RHEL7_OSTreeSetup(KickstartCommand):
             retcmd.append('--url="%s"' % self.url)
         if self.ref:
             retcmd.append('--ref="%s"' % self.ref)
-        if self.noGpg:
+        if self.nogpg:
             retcmd.append('--nogpg')
         return ' '.join(retcmd)
 
diff --git a/tests/commands/ostreesetup.py b/tests/commands/ostreesetup.py
index 3c59a5a..ee7be8a 100644
--- a/tests/commands/ostreesetup.py
+++ b/tests/commands/ostreesetup.py
@@ -25,7 +25,7 @@ class RHEL7_TestCase(CommandTest):
     def runTest(self):
         # pass
         self.assert_parse("ostreesetup --osname=fedora-atomic --url=http://example.com/repo --ref=fedora-atomic/sometest/base/core")
-        cmdstr = "ostreesetup --osname=\"fedora-atomic\" --remote=\"fedora-atomic\" --url=\"http://example.com/repo\" --ref=\"fedora-atomic/sometest/base/core\""
+        cmdstr = "ostreesetup --osname=\"fedora-atomic\" --remote=\"fedora-atomic\" --url=\"http://example.com/repo\" --ref=\"fedora-atomic/sometest/base/core\" --nogpg"
         self.assert_parse(cmdstr, cmdstr + '\n')
 
         # fail - we have required arguments
-- 
1.9.3