Code Duplication    Length = 18-18 lines in 2 locations

rsudp/c_alert.py 1 location

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

rsudp/c_rsam.py 1 location

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