Skip to content

Commit

Permalink
Fix import error in python3
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Jan 12, 2017
1 parent 533e0b4 commit 1d2116c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 1 addition & 4 deletions qingstor/qsctl/commands/transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@

import os
import sys
import json
import errno

from .base import BaseCommand

from ..constants import (
BUFFER_SIZE,
PART_SIZE,
HTTP_OK,
HTTP_OK_CREATED,
Expand All @@ -36,8 +34,7 @@
uni_print,
get_part_numbers,
FileChunk,
StdinFileChunk,
json_loads,)
StdinFileChunk,)


class TransferCommand(BaseCommand):
Expand Down
6 changes: 4 additions & 2 deletions qingstor/qsctl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@
import sys
import json
import platform
import mimetypes
from yaml import load
from StringIO import StringIO


try:
from yaml import CLoader as Loader
from StringIO import StringIO
except ImportError:
from yaml import Loader
from io import StringIO


from .constants import PART_SIZE

Expand Down

0 comments on commit 1d2116c

Please sign in to comment.