Skip to content

Commit

Permalink
Bug 809806 - Make createprecomplete.py more importable. r=ted
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed Nov 13, 2012
1 parent 1fbb7da commit 31b19bc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions config/createprecomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@ def get_build_entries(root_path):

return rel_file_path_list, rel_dir_path_list

def generate_precomplete():
def generate_precomplete(root_path):
""" Creates the precomplete file containing the remove and rmdir
application update instructions. The current working directory is used
application update instructions. The given directory is used
for the location to enumerate and to create the precomplete file.
"""
root_path = os.getcwd()
# If inside a Mac bundle use the root of the bundle for the path.
if os.path.basename(root_path) == "MacOS":
root_path = os.path.abspath(os.path.join(root_path, '../../'))
Expand All @@ -64,4 +63,4 @@ def generate_precomplete():
precomplete_file.close()

if __name__ == "__main__":
generate_precomplete()
generate_precomplete(os.getcwd())

0 comments on commit 31b19bc

Please sign in to comment.