Code Duplication    Length = 18-18 lines in 2 locations

rsudp/c_rsam.py 1 location

@@ 133-150 (lines=18) @@
130
			sys.exit(2)
131
132
133
	def _getq(self):
134
		"""
135
		Reads data from the queue and updates the stream.
136
137
		:rtype: bool
138
		:return: Returns ``True`` if stream is updated, otherwise ``False``.
139
		"""
140
		d = self.queue.get(True, timeout=None)
141
		self.queue.task_done()
142
		if self.cha in str(d):
143
			self.raw = rs.update_stream(stream=self.raw, d=d, fill_value='latest')
144
			return True
145
		elif 'TERM' in str(d):
146
			self.alive = False
147
			printM('Exiting.', self.sender)
148
			sys.exit()
149
		else:
150
			return False
151
152
153
	def _deconvolve(self):

rsudp/c_alert.py 1 location

@@ 176-193 (lines=18) @@
173
		self._print_filt()
174
175
176
	def _getq(self):
177
		'''
178
		Reads data from the queue and updates the stream.
179
180
		:rtype: bool
181
		:return: Returns ``True`` if stream is updated, otherwise ``False``.
182
		'''
183
		d = self.queue.get(True, timeout=None)
184
		self.queue.task_done()
185
		if self.cha in str(d):
186
			self.raw = rs.update_stream(stream=self.raw, d=d, fill_value='latest')
187
			return True
188
		elif 'TERM' in str(d):
189
			self.alive = False
190
			printM('Exiting.', self.sender)
191
			sys.exit()
192
		else:
193
			return False
194
195
196
	def _deconvolve(self):