File: create_nonexistant_gitso-hosts.patch

package info (click to toggle)
gitso 0.6.2%2Bsvn158%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 1,820 kB
  • ctags: 143
  • sloc: python: 806; sh: 279; makefile: 15
file content (16 lines) | stat: -rw-r--r-- 504 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: create ~/.gitso-hosts if it doesn't exist
Author: Florian Schlichting <fsfs@debian.org>

--- a/ConnectionWindow.py
+++ b/ConnectionWindow.py
@@ -322,6 +322,10 @@
 			handle = open(file, 'a')
 			handle.write(", %s" % host)
 			handle.close()
+                else:
+			handle = open(file, 'w')
+			handle.write("%s" % host)
+			handle.close()
 	
 	def displayHostBox(self, list, text):
 		self.hostField = wx.ComboBox(self, 30, "", wx.Point(105, 12), wx.Size(230, -1), list, wx.CB_DROPDOWN)