Skip to content

Commit 8d85ed1

Browse files
author
Dana Powers
committed
Minor import cleanups
1 parent 3ec3989 commit 8d85ed1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

kafka/conn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import copy
22
import logging
3+
from random import shuffle
34
import socket
45
import struct
5-
from random import shuffle
66
from threading import local
77

88
from kafka.common import ConnectionError

kafka/consumer.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
from multiprocessing import Process, Queue as MPQueue, Event, Value
99
from Queue import Empty, Queue
1010

11-
import kafka
11+
import kafka.common
1212
from kafka.common import (
13-
FetchRequest,
14-
OffsetRequest, OffsetCommitRequest,
15-
OffsetFetchRequest,
16-
ConsumerFetchSizeTooSmall, ConsumerNoMoreData
13+
FetchRequest, OffsetRequest,
14+
OffsetCommitRequest, OffsetFetchRequest,
15+
ConsumerFetchSizeTooSmall, ConsumerNoMoreData,
16+
UnknownTopicOrPartitionError
1717
)
1818

1919
from kafka.util import ReentrantTimer
@@ -114,7 +114,7 @@ def get_or_init_offset_callback(resp):
114114
try:
115115
kafka.common.check_error(resp)
116116
return resp.offset
117-
except kafka.common.UnknownTopicOrPartitionError:
117+
except UnknownTopicOrPartitionError:
118118
return 0
119119

120120
for partition in partitions:

0 commit comments

Comments
 (0)