From 2f1e1d67f203c139d9da8684ba20df79c7074eef Mon Sep 17 00:00:00 2001 From: Fred Barclay Date: Wed, 24 May 2017 13:39:36 -0500 Subject: Remove trailing whitespace from contrib --- contrib/fix_private-bin.py | 10 +++++----- contrib/fjclip.py | 6 +++--- contrib/fjdisplay.py | 4 ++-- contrib/fjresize.py | 4 ++-- contrib/update_deb.sh | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) (limited to 'contrib') diff --git a/contrib/fix_private-bin.py b/contrib/fix_private-bin.py index 270c758a2..86fd3d16b 100755 --- a/contrib/fix_private-bin.py +++ b/contrib/fix_private-bin.py @@ -36,18 +36,18 @@ def fixSymlinkedBins(files, replMap): Used to add filenames to private-bin directives of files if the ones present are mentioned in replMap replMap is a dict where key is the marker filename and value is the filename to add """ - + rxs=dict() for (old,new) in replMap.items(): rxs[old]=re.compile("\\b"+old+"\\b") rxs[new]=re.compile("\\b"+new+"\\b") #print(rxs) - + for filename in files: lines=None with open(filename,"r") as file: lines=file.readlines() - + shouldUpdate=False for (i,line) in enumerate(lines): if privRx.search(line): @@ -56,7 +56,7 @@ def fixSymlinkedBins(files, replMap): lines[i]=rxs[old].sub(old+","+new, line) shouldUpdate=True print(lines[i]) - + if shouldUpdate: with open(filename,"w") as file: file.writelines(lines) @@ -132,7 +132,7 @@ def main(): if len(sys.argv)>2 or (len(sys.argv)==2 and (sys.argv[1] == '-h' or sys.argv[1] == '--help') ): printHelp() exit(1) - + profilesPath=None if len(sys.argv)==2: if os.path.isdir(sys.argv[1]): diff --git a/contrib/fjclip.py b/contrib/fjclip.py index cd12cd289..b45959841 100755 --- a/contrib/fjclip.py +++ b/contrib/fjclip.py @@ -10,10 +10,10 @@ firemon --x11 to see available running x11 firejails. firejail names can be shor to least ambiguous. for example 'work-libreoffice' can be shortened to 'work' if no other firejails name starts with 'work'. warning: browsers are dangerous. clipboards from browsers are dangerous. see -https://github.com/dxa4481/Pastejacking +https://github.com/dxa4481/Pastejacking fjclip.py strips whitespace from both ends, but does nothing else to protect you. use a simple gui text editor like -gedit if you want to see what your pasting.""" +gedit if you want to see what your pasting.""" if len(sys.argv) != 3 or sys.argv == '-h' or sys.argv == '--help': print(usage) @@ -32,4 +32,4 @@ if sys.argv[2] == '-': else: display = fjdisplay.getdisplay(sys.argv[2]) clipout = subprocess.Popen(['xsel','-b','-i','--display',display],stdin=subprocess.PIPE) - clipout.communicate(clipin) \ No newline at end of file + clipout.communicate(clipin) diff --git a/contrib/fjdisplay.py b/contrib/fjdisplay.py index 0e0ef01ec..3f409545f 100755 --- a/contrib/fjdisplay.py +++ b/contrib/fjdisplay.py @@ -16,7 +16,7 @@ def getfirejails(): namematch = re.search('--name=(\w+\S*)',line) if namematch: name = namematch.group(1) - displaymatch = re.search('DISPLAY (:\d+)',line) + displaymatch = re.search('DISPLAY (:\d+)',line) if displaymatch: firejails[name] = displaymatch.group(1) return firejails @@ -40,4 +40,4 @@ if __name__ == '__main__': if len(sys.argv) == 1: print(getfirejails()) if len(sys.argv) == 2: - print (getdisplay(sys.argv[1])) \ No newline at end of file + print (getdisplay(sys.argv[1])) diff --git a/contrib/fjresize.py b/contrib/fjresize.py index 52b289159..3997cf280 100755 --- a/contrib/fjresize.py +++ b/contrib/fjresize.py @@ -18,8 +18,8 @@ example: if len(sys.argv) == 2: out = subprocess.check_output(['xrandr','--display',fjdisplay.getdisplay(sys.argv[1])]) print(out) -elif len(sys.argv) == 3: +elif len(sys.argv) == 3: out = subprocess.check_output(['xrandr','--display',fjdisplay.getdisplay(sys.argv[1]),'--output','default','--mode',sys.argv[2]]) print(out) else: - print(usage) \ No newline at end of file + print(usage) diff --git a/contrib/update_deb.sh b/contrib/update_deb.sh index c2adffaf8..9d1567c0e 100755 --- a/contrib/update_deb.sh +++ b/contrib/update_deb.sh @@ -1,7 +1,7 @@ #!/bin/sh -# Purpose: Fetch, compile, and install firejail from GitHub source. For +# Purpose: Fetch, compile, and install firejail from GitHub source. For # Debian-based distros only (Ubuntu, Mint, etc). -set -e +set -e git clone --depth=1 https://www.github.com/netblue30/firejail.git cd firejail ./configure --prefix=/usr -- cgit v1.2.3-54-g00ecf