Tolti alcuni is che non avevano senso

Leonardo [2010-06-25 12:40]
Tolti alcuni is che non avevano senso
Filename
example_script.py
diff --git a/example_script.py b/example_script.py
index a2a12d8..4a86dde 100755
--- a/example_script.py
+++ b/example_script.py
@@ -60,12 +60,12 @@ mail_text += "Duration of the download: %s.\n\n" % duration
 recipients = [ "user1@provider.com", "user2@anotherprovider.org" , "owner" ]

 # Move download to the right place
-if download.get_type() is "video":
+if download.get_type() == "video":
     download.move("/shared/Films")
     mail_text += "The file has been recognized as a film so it has been copied\n"
     mail_text += "in /shared/Films.\n"

-elif download.get_type() is "audio":
+elif download.get_type() == "audio":
     download.move("/shared/Musica")
     mail_text += "The file has been recognized as music so it has been copied\n"
     mail_text += "in /shared/Music.\n"
ViewGit