From: Gabriel Filion Date: Mon, 16 Aug 2010 01:29:29 +0000 (-0400) Subject: import cleanup X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2ff672c48f3dbde761b30775adcdc76a621df527;p=packages%2Fb%2Fbup.git import cleanup Remove unused imported modules. I started using the pyflakes.vim plugin and it automagically shows a bunch of problems/uncleanliness in the code. It helped me pull this out in 15mins. This change shouldn't have any impact on performance or functionality but it makes the code cleaner. Signed-off-by: Gabriel Filion --- diff --git a/cmd/fsck-cmd.py b/cmd/fsck-cmd.py index aa78d88..1c25058 100755 --- a/cmd/fsck-cmd.py +++ b/cmd/fsck-cmd.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -import sys, os, glob, subprocess, time +import sys, os, glob, subprocess from bup import options, git from bup.helpers import * diff --git a/cmd/ftp-cmd.py b/cmd/ftp-cmd.py index f103a61..1edb5f5 100755 --- a/cmd/ftp-cmd.py +++ b/cmd/ftp-cmd.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -import sys, os, re, stat, fnmatch +import sys, os, stat, fnmatch from bup import options, git, shquote, vfs from bup.helpers import * diff --git a/cmd/fuse-cmd.py b/cmd/fuse-cmd.py index 5e9809a..450d366 100755 --- a/cmd/fuse-cmd.py +++ b/cmd/fuse-cmd.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -import sys, os, stat, errno, re, time, tempfile +import sys, os, errno from bup import options, git, vfs from bup.helpers import * try: diff --git a/cmd/index-cmd.py b/cmd/index-cmd.py index 15ee023..be064fb 100755 --- a/cmd/index-cmd.py +++ b/cmd/index-cmd.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -import os, sys, stat, time +import sys, stat, time from bup import options, git, index, drecurse from bup.helpers import * diff --git a/cmd/join-cmd.py b/cmd/join-cmd.py index 0e1e1ff..81febac 100755 --- a/cmd/join-cmd.py +++ b/cmd/join-cmd.py @@ -1,8 +1,7 @@ #!/usr/bin/env python -import sys, time, struct -from bup import hashsplit, git, options, client +import sys +from bup import git, options, client from bup.helpers import * -from subprocess import PIPE optspec = """ diff --git a/cmd/ls-cmd.py b/cmd/ls-cmd.py index 5a22c1d..57f4275 100755 --- a/cmd/ls-cmd.py +++ b/cmd/ls-cmd.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -import sys, os, stat +import sys, stat from bup import options, git, vfs from bup.helpers import * diff --git a/cmd/random-cmd.py b/cmd/random-cmd.py index 46fd4f2..9a24fac 100755 --- a/cmd/random-cmd.py +++ b/cmd/random-cmd.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -import sys, mmap +import sys from bup import options, _faster from bup.helpers import * diff --git a/cmd/save-cmd.py b/cmd/save-cmd.py index 9078455..23bcabc 100755 --- a/cmd/save-cmd.py +++ b/cmd/save-cmd.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -import sys, re, errno, stat, time, math +import sys, stat, time, math from bup import hashsplit, git, options, index, client from bup.helpers import * diff --git a/cmd/server-cmd.py b/cmd/server-cmd.py index b1a7f6f..5acc98a 100755 --- a/cmd/server-cmd.py +++ b/cmd/server-cmd.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -import sys, struct, mmap +import sys, struct from bup import options, git from bup.helpers import * diff --git a/cmd/split-cmd.py b/cmd/split-cmd.py index 6546d1f..26340bf 100755 --- a/cmd/split-cmd.py +++ b/cmd/split-cmd.py @@ -1,8 +1,7 @@ #!/usr/bin/env python -import sys, time, struct +import sys, time from bup import hashsplit, git, options, client from bup.helpers import * -from subprocess import PIPE optspec = """ diff --git a/cmd/version-cmd.py b/cmd/version-cmd.py index 3469086..7ee65f9 100755 --- a/cmd/version-cmd.py +++ b/cmd/version-cmd.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -import sys, os, glob +import sys from bup import options from bup.helpers import * diff --git a/cmd/web-cmd.py b/cmd/web-cmd.py index 6092ad2..d0ca730 100755 --- a/cmd/web-cmd.py +++ b/cmd/web-cmd.py @@ -1,8 +1,7 @@ #!/usr/bin/env python -import sys, stat, cgi, shutil, urllib, mimetypes, posixpath, time +import sys, stat, urllib, mimetypes, posixpath, time import tornado.httpserver import tornado.ioloop -import tornado.template import tornado.web from bup import options, git, vfs from bup.helpers import * diff --git a/lib/bup/client.py b/lib/bup/client.py index a642e4d..941cdfe 100644 --- a/lib/bup/client.py +++ b/lib/bup/client.py @@ -1,4 +1,4 @@ -import re, struct, errno, select, time +import re, struct, errno, time from bup import git, ssh from bup.helpers import * diff --git a/lib/bup/drecurse.py b/lib/bup/drecurse.py index a5fddaf..169aa31 100644 --- a/lib/bup/drecurse.py +++ b/lib/bup/drecurse.py @@ -1,4 +1,4 @@ -import stat, heapq +import stat from bup.helpers import * try: diff --git a/lib/bup/git.py b/lib/bup/git.py index a978daa..87351a1 100644 --- a/lib/bup/git.py +++ b/lib/bup/git.py @@ -2,7 +2,7 @@ bup repositories are in Git format. This library allows us to interact with the Git data structures. """ -import os, errno, zlib, time, subprocess, struct, stat, re, tempfile +import os, zlib, time, subprocess, struct, stat, re, tempfile import heapq from bup.helpers import * diff --git a/lib/bup/hashsplit.py b/lib/bup/hashsplit.py index 28e90d2..71e0327 100644 --- a/lib/bup/hashsplit.py +++ b/lib/bup/hashsplit.py @@ -1,4 +1,4 @@ -import sys, math +import math from bup import _faster from bup.helpers import * diff --git a/lib/bup/index.py b/lib/bup/index.py index bc057f9..623b2d6 100644 --- a/lib/bup/index.py +++ b/lib/bup/index.py @@ -1,4 +1,4 @@ -import os, stat, time, struct, tempfile +import os, stat, struct, tempfile from bup.helpers import * EMPTY_SHA = '\0'*20