resolved merge conflicts upsteam
This commit is contained in:
commit
45f1b1c3df
|
@ -3,7 +3,6 @@ src/paths.py
|
||||||
============
|
============
|
||||||
"""
|
"""
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
@ -12,7 +11,6 @@ from datetime import datetime
|
||||||
from shutil import move
|
from shutil import move
|
||||||
from kivy.utils import platform
|
from kivy.utils import platform
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('default')
|
logger = logging.getLogger('default')
|
||||||
|
|
||||||
# When using py2exe or py2app, the variable frozen is added to the sys
|
# When using py2exe or py2app, the variable frozen is added to the sys
|
||||||
|
@ -54,8 +52,7 @@ def lookupAppdataFolder():
|
||||||
'Could not find home folder, please report this message'
|
'Could not find home folder, please report this message'
|
||||||
' and your OS X version to the BitMessage Github.')
|
' and your OS X version to the BitMessage Github.')
|
||||||
elif platform == 'android':
|
elif platform == 'android':
|
||||||
dataFolder = os.path.join(
|
dataFolder = os.path.join(os.environ['ANDROID_PRIVATE'] + '/', APPNAME) + '/'
|
||||||
os.environ['ANDROID_PRIVATE'] + '/', APPNAME) + '/'
|
|
||||||
elif 'win32' in sys.platform or 'win64' in sys.platform:
|
elif 'win32' in sys.platform or 'win64' in sys.platform:
|
||||||
dataFolder = os.path.join(
|
dataFolder = os.path.join(
|
||||||
os.environ['APPDATA'].decode(
|
os.environ['APPDATA'].decode(
|
||||||
|
@ -88,6 +85,7 @@ def codePath():
|
||||||
if frozen == "macosx_app" else sys._MEIPASS)
|
if frozen == "macosx_app" else sys._MEIPASS)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def tail(f, lines=20):
|
def tail(f, lines=20):
|
||||||
"""Returns last lines in the f file object"""
|
"""Returns last lines in the f file object"""
|
||||||
total_lines_wanted = lines
|
total_lines_wanted = lines
|
||||||
|
@ -97,9 +95,9 @@ def tail(f, lines=20):
|
||||||
block_end_byte = f.tell()
|
block_end_byte = f.tell()
|
||||||
lines_to_go = total_lines_wanted
|
lines_to_go = total_lines_wanted
|
||||||
block_number = -1
|
block_number = -1
|
||||||
|
blocks = []
|
||||||
# blocks of size BLOCK_SIZE, in reverse order starting
|
# blocks of size BLOCK_SIZE, in reverse order starting
|
||||||
# from the end of the file
|
# from the end of the file
|
||||||
blocks = []
|
|
||||||
while lines_to_go > 0 and block_end_byte > 0:
|
while lines_to_go > 0 and block_end_byte > 0:
|
||||||
if block_end_byte - BLOCK_SIZE > 0:
|
if block_end_byte - BLOCK_SIZE > 0:
|
||||||
# read the last block we haven't yet read
|
# read the last block we haven't yet read
|
||||||
|
|
Reference in New Issue
Block a user