~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/win32utils.py

  • Committer: Jonathan Lange
  • Date: 2009-12-16 06:38:15 UTC
  • mto: This revision was merged to the branch mainline in revision 4907.
  • Revision ID: jml@canonical.com-20091216063815-3p9cc9fzcfj5ten9
RemoveĀ flakes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import glob
23
23
import os
24
24
import re
25
 
import shlex
26
25
import struct
27
 
import StringIO
28
26
import sys
29
27
 
30
28
 
392
390
 
393
391
 
394
392
def _ensure_unicode(s):
395
 
    from bzrlib import osutils
396
393
    if s and type(s) != unicode:
397
394
        from bzrlib import osutils
398
395
        s = s.decode(osutils.get_user_encoding())
648
645
        prototype = ctypes.WINFUNCTYPE(POINTER(LPCWSTR), LPCWSTR, POINTER(INT))
649
646
        command_line = GetCommandLine()
650
647
        # Skip the first argument, since we only care about parameters
651
 
        argv = _command_line_to_argv(GetCommandLine())[1:]
 
648
        argv = _command_line_to_argv(command_line)[1:]
652
649
        if getattr(sys, 'frozen', None) is None:
653
650
            # Invoked via 'python.exe' which takes the form:
654
651
            #   python.exe [PYTHON_OPTIONS] C:\Path\bzr [BZR_OPTIONS]