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

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