[ditrack commit] r1233 - src/trunk/DITrack/Command

Ivan Glushkov gli.work at gmail.com
Wed Jan 31 14:14:07 PST 2007


On Wed, 31 Jan 2007 23:10:40 +0200, <vss at ditrack.org> wrote:

> Author: vss
> Date: 2007-01-31 13:10:40 -0800 (Wed, 31 Jan 2007)
> New Revision: 1233
>
> Modified:
>    src/trunk/DITrack/Command/new.py
> Log:
> Replace calls to print() with sys.stdout.write(). Minor style fixes.
>
> Modified: src/trunk/DITrack/Command/new.py
> ===================================================================
> --- src/trunk/DITrack/Command/new.py	2007-01-31 07:41:57 UTC (rev 1232)
> +++ src/trunk/DITrack/Command/new.py	2007-01-31 21:10:40 UTC (rev 1233)
> @@ -28,6 +28,8 @@
>  # POSSIBILITY OF SUCH DAMAGE.
>  #
> +import sys
> +
>  # DITrack modules
>  import DITrack.Command.generic
> @@ -106,9 +108,11 @@
>              version_due=due_version,
>              description=descr)
> -        # check, if we should commit new issue
> +        # Check if we should commit the new issue
>          if opts.var["no_commits"]:
> -            print ("New local issue #%s added" % local_id)
> +            sys.stdout.write("New local issue #%s added\n" % local_id)
>          else:
>              id = db.commit_issue(local_id)
> -            print ("New local issue #%s committed as i#%s" %  
> (local_id,id))
> +            sys.stdout.write(
> +                "New local issue #%s committed as i#%s\n" % (local_id,  
> id)
> +            )

why sys.stdout.write instead of print?
one more project rule? ;)


More information about the Dev mailing list