Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pysteam/_shortcut_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import os
import re

from model import Shortcut
from .model import Shortcut

class ShortcutParser(object):

Expand All @@ -24,7 +24,7 @@ def parse(self, path, require_exists=False):
return self.match_base(file_contents)

def match_base(self,string):
match = re.match(ur"\u0000shortcuts\u0000(.*)\u0008\u0008$",string, re.IGNORECASE)
match = re.match(u"\u0000shortcuts\u0000(.*)\u0008\u0008$",string, re.IGNORECASE)
if match:
return self.match_array_string(match.groups()[0])
else:
Expand All @@ -39,7 +39,7 @@ def match_array_string(self,string):
# ignoring it for now
shortcuts = []
while True:
match = re.match(ur"(.*)\u0000[0-9]+\u0000(\u0001AppName.*)\u0008",string, re.IGNORECASE)
match = re.match(u"(.*)\u0000[0-9]+\u0000(\u0001AppName.*)\u0008",string, re.IGNORECASE)
if match:
groups = match.groups()
string = groups[0]
Expand All @@ -53,7 +53,7 @@ def match_shortcut_string(self,string):
# for the shortcut string (Appname, Exe, StartDir, etc), as oppposed
# to matching for general Key-Value pairs. This could possibly create a
# lot of work for me later, but for now it will get the job done
match = re.match(ur"\u0001AppName\u0000(.*)\u0000\u0001Exe\u0000(.*)\u0000\u0001StartDir\u0000(.*)\u0000\u0001icon\u0000(.*)\u0000\u0000tags\u0000(.*)\u0008",string, re.IGNORECASE)
match = re.match(u"\u0001AppName\u0000(.*)\u0000\u0001Exe\u0000(.*)\u0000\u0001StartDir\u0000(.*)\u0000\u0001icon\u0000(.*)\u0000\u0000tags\u0000(.*)\u0008",string, re.IGNORECASE)
if match:
# The 'groups' that are returned by the match should be the data
# contained in the file. Now just make a Shortcut out of that data
Expand All @@ -70,7 +70,7 @@ def match_shortcut_string(self,string):
def match_tags_string(self,string):
tags = []
while True:
match = re.match(ur"(.*)\u0001[0-9]+\u0000(.*?)\u0000",string)
match = re.match(u"(.*)\u0001[0-9]+\u0000(.*?)\u0000",string)
if match:
groups = match.groups()
string = groups[0]
Expand Down
2 changes: 1 addition & 1 deletion pysteam/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import shutil

import paths
from . import paths

VALID_EXTENSIONS = [
'.png',
Expand Down
8 changes: 4 additions & 4 deletions pysteam/shortcuts.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# encoding: utf-8

import paths
from . import paths

from _crc_algorithms import Crc
from _shortcut_generator import ShortcutGenerator
from _shortcut_parser import ShortcutParser
from ._crc_algorithms import Crc
from ._shortcut_generator import ShortcutGenerator
from ._shortcut_parser import ShortcutParser

def shortcut_app_id(shortcut):
"""
Expand Down
6 changes: 3 additions & 3 deletions pysteam/steam.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import os
import platform

import paths
import winutils
from . import paths
from . import winutils

from model import LocalUserContext, Steam
from .model import LocalUserContext, Steam

def get_steam():
"""
Expand Down