Code Duplication    Length = 12-12 lines in 2 locations

rsudp/c_tweet.py 1 location

@@ 247-258 (lines=12) @@
244
		
245
		self.last_message = message
246
247
	def run(self):
248
		"""
249
		Reads data from the queue and tweets a message if it sees an ALARM or IMGPATH message
250
		"""
251
		while True:
252
			d = self.getq()
253
254
			if 'ALARM' in str(d):
255
				self._when_alarm(d)
256
257
			elif 'IMGPATH' in str(d):
258
				self._when_img(d)
259

rsudp/c_telegram.py 1 location

@@ 178-189 (lines=12) @@
175
				printM('Could not find image: %s' % (imgpath), sender=self.sender)
176
177
178
	def run(self):
179
		"""
180
		Reads data from the queue and sends a message if it sees an ALARM or IMGPATH message
181
		"""
182
		while True:
183
			d = self.getq()
184
185
			if 'ALARM' in str(d):
186
				self._when_alarm(d)
187
188
			elif 'IMGPATH' in str(d):
189
				self._when_img(d)
190