[Python-modules-commits] r29847 - in packages/python-django/trunk/debian (django-admin)

bam at users.alioth.debian.org bam at users.alioth.debian.org
Tue Jul 22 00:11:00 UTC 2014


    Date: Tuesday, July 22, 2014 @ 00:10:59
  Author: bam
Revision: 29847

Update django-admin to work with "dash -n"

Previously we hid the shell code from Python, now we hide the Python code from
Shell too.

This is required as "dash -n" won't stop parsing the file at the exec.

Modified:
  packages/python-django/trunk/debian/django-admin

Modified: packages/python-django/trunk/debian/django-admin
===================================================================
--- packages/python-django/trunk/debian/django-admin	2014-07-21 23:25:28 UTC (rev 29846)
+++ packages/python-django/trunk/debian/django-admin	2014-07-22 00:10:59 UTC (rev 29847)
@@ -1,5 +1,5 @@
 #!/bin/sh
-sh=''''
+shell_code=''' '
 # shell code
 if command -v python3 > /dev/null && test -e /usr/lib/python3/dist-packages/django/bin/django-admin.py
 then
@@ -14,8 +14,8 @@
     echo "Cannot find installed version of python-django or python3-django." >&2
     exit 1
 fi
-' '''
 
+python_code='''
 # python code
 import sys
 print("Using: Python %d.%d" % sys.version_info[:2])
@@ -24,3 +24,5 @@
 
 if __name__ == "__main__":
     management.execute_from_command_line()
+
+# End of Python code. Do not modify this line. #'




More information about the Python-modules-commits mailing list