[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.44-586-g18cd804

Mika Pflüger debian at mikapflueger.de
Fri May 25 12:43:18 UTC 2012


The following commit has been merged in the develop branch:
commit 23012dbc9709e9a78e29090e745d28f56b7e2a46
Author: Mika Pflüger <debian at mikapflueger.de>
Date:   Sun May 20 19:35:17 2012 +0200

    Remove obsolete functions shellquote, apt_get_knows and append_to_file

diff --git a/piuparts.py b/piuparts.py
index 6d45357..d6cb59b 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -360,26 +360,6 @@ def indent_string(str):
     return "\n".join(["  " + line for line in str.split("\n")])
 
 
-safechars = ("abcdefghijklmnopqrstuvwxyz" +
-             "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +
-             "0123456789" +
-             ",.-_!%/=+:")
-
-def shellquote(str):
-    if str == "":
-        return "''"
-
-    result = []
-    for c in str:
-        if c == "'":
-            result.append("\"'\"")
-        elif c in safechars:
-            result.append(c)
-        else:
-            result.append("\\" + c)
-    return "".join(result)
-
-
 def run(command, ignore_errors=False):
     """Run an external command and die with error message if it fails."""
     assert type(command) == type([])
@@ -451,17 +431,6 @@ def create_file(name, contents):
         panic()
 
 
-def append_to_file(name, contents):
-    """Append contents to an existing file."""
-    try:
-        f = file(name, "a")
-        f.write(contents)
-        f.close()
-    except IOError, detail:
-        logging.error("Couldn't append to file %s: %s" % (name, detail))
-        panic()
-
-
 def remove_files(filenames):
     """Remove some files."""
     for filename in filenames:
@@ -947,9 +916,6 @@ class Chroot:
             self.run_scripts("post_distupgrade")
             self.check_for_no_processes()
 
-    def apt_get_knows(self, packages):
-        return self.get_known_packages(packages)
-
     def get_known_packages(self, packages):
         """Does apt-get (or apt-cache) know about a set of packages?"""
         known_packages = []

-- 
piuparts git repository



More information about the Piuparts-commits mailing list