[StGIT PATCH 2/4] Don't write None to the conf file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If we don't have a value for the remote, just don't write it. Writing
None will either write the string "None" or crash StGIT, depending on
how exactly the call is done -- and neither is what we want!

Signed-off-by: Karl Hasselström <kha@xxxxxxxxxxx>

---

 stgit/stack.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/stgit/stack.py b/stgit/stack.py
index 030562d..0ce9992 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -546,7 +546,8 @@ class Series(PatchSet):
 
     def set_parent(self, remote, localbranch):
         if localbranch:
-            self.__set_parent_remote(remote)
+            if remote:
+                self.__set_parent_remote(remote)
             self.__set_parent_branch(localbranch)
         # We'll enforce this later
 #         else:

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux